<?php if(!defined('SABLOG_ROOT')) exit('Access Denied');?>
{template header}

	<div id="page">
		<div id="wrap">
			<script type="text/javascript" src="$options[url]include/jscript/ajax.js"></script>
			<script type="text/javascript" src="$options[url]include/jscript/show.js"></script>
			<script type="text/javascript" src="$options[url]include/jscript/fiximage.js"></script>
			<script type="text/javascript">
			window.onload=function(){
				fiximage('$options[attachments_thumbs_size]');
			}
			</script>
			<h1 class="title">$article[title]</h1>

			<p class="post-date">Written by <a href="$article[userurl]">$article[username]</a> on $article[dateline]. <a href="$article[cateurl]">$article[cname]</a></p>

			<!--{if !$article['allowread']}-->

				<div class="needpwd"><form action="$article[url]" method="post">这篇日志被加密了。请输入密码后查看。<br /><input class="formfield" type="password" name="readpassword" style="margin-right:5px;" /> <button type="submit">提交</button></form></div>

			<!--{else}-->

				<div class="post-body">$article[content]</div>

				<!--{if $article['image']}-->
					<!--{loop $article['image'] $image}-->
						<!--{if $image[6]}-->
							<div class="attach">图片附件(缩略图):<br /><a href="$options[url]attachment.php?id=$image[0]" target="_blank"><img src="{$options[url]}{$image[1]}" border="0" alt="$image[7]&#13;&#13;大小: $image[2]&#13;尺寸: $image[3] x $image[4]&#13;浏览: $image[5] 次&#13;点击打开新窗口浏览全图" width="$image[3]" height="$image[4]" /></a></div>
						<!--{else}-->
							<div class="attach">图片附件:<br /><a href="$options[url]attachment.php?id=$image[0]" target="_blank"><img src="{$options[url]}{$image[1]}" border="0" alt="$image[7]&#13;&#13;大小: $image[2]&#13;尺寸: $image[3] x $image[4]&#13;浏览: $image[5] 次&#13;点击打开新窗口浏览全图" width="$image[3]" height="$image[4]" /></a></div>
						<!--{/if}-->
					<!--{/loop}-->
				<!--{/if}-->

				<!--{if $article['file']}-->
					<!--{loop $article['file'] $file}-->
						<div class="attach">附件:<a title="$file[1]" href="$options[url]attachment.php?id=$file[0]" target="_blank">$file[1]</a> ($file[2], 下载次数:$file[3])</div>
					<!--{/loop}-->
				<!--{/if}-->

				<!--{if $article['keywords']}-->
					<h2 class="art-tag">Tags: $article[alltags]</h2>
				<!--{/if}-->

				<p id="article-other">&laquo; <a href="$options[url]?action=show&amp;id=$article[articleid]&amp;goto=previous">上一篇</a> | <a href="$options[url]?action=show&amp;id=$article[articleid]&amp;goto=next">下一篇</a> &raquo;</p>

				<!--{if $options['related_shownum'] && $related_total > 1 && $relids != $article['articleid']}-->
					<div class="clear-height"></div>
					<h3 class="title">相关文章</h3>
					<div class="lesscontent">
						<ul>
						<!--{loop $titledb $title}-->
							<li><a href="$title[url]">$title[title]</a> (浏览: <font color="#CC0000">$title[views]</font>, 评论: <font color="#CC0000">$title[comments]</font>)</li>
						<!--{/loop}-->
						</ul>
					</div>
				<!--{/if}-->

				<!--{if $options['enable_trackback'] && !$article['closetrackback']}-->
					<div class="clear-height"></div>
					<a name="trackbacks"></a>
					<h3 class="title"><!--{if $article['trackbacks']}--><a href="###" onclick="showhide('tbbody');" title="点击查看所有Trackbacks">Trackbacks</a><!--{else}-->Trackbacks<!--{/if}--></h3>
					<div id="tburl">
					<table border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="85" height="20"><a href="javascript:;" onclick="showajaxdiv('trackback', '$options[url]getxml.php?action=trackback&amp;id=$article[articleid]', 300);"><img src="$options[url]templates/$options[templatename]/img/utf8.jpg" width="73px" height="15px" border="0" alt="点击获得Trackback地址,Encode: UTF-8" /></a></td>
						</tr>
					</table>
					</div>
				<!--{/if}-->

				<!--{if $article['trackbacks']}-->
					<div id="tbbody" style="display:none">
					<!--{loop $trackbackdb $trackback}-->
						<div class="lesscontent">标题: <a href="$trackback[url]" target="_blank">$trackback[title]</a><br />
						摘要: $trackback[excerpt]</div>
						<div class="lessdate">Tracked by <a href="$trackback[url]" target="_blank">$trackback[blog_name]</a> on $trackback[dateline] <font color="#000000">#<strong>$trackback[tborderid]</strong></font></div>
					<!--{/loop}-->
					</div>
				<!--{/if}-->

				<a name="comment"></a>
				<!--{if $article['comments']}-->
					<div class="clear-height"></div>
					<h3 class="title">访客评论</h3>
					<!--{loop $commentdb $comment}-->
						<a name="cm$comment[commentid]"></a>
						<!--{if $options['show_avatars']}-->
							<div class="gravatar"><img src="http://www.gravatar.com/avatar/$comment[avataraddress]?s=48&amp;r=$options[avatar_rating]&amp;d=$options[avatar_default]" alt="Gravatar" height="48" width="48" /></div>
						<!--{/if}-->
						<div class="lesscontent" id="comm_$comment[commentid]">$comment[content]</div>
						<div class="lessdate">Post by $comment[author] on <a title="引用此文发表评论" href="###" onclick="addquote('comm_$comment[commentid]','$comment[quoteuser]')">$comment[dateline]</a> <font color="#000000">#<strong>$comment[cmtorderid]</strong></font></div>
						<a tip="" name="cm193"></a>

					<!--{/loop}-->
					$multipage
				<!--{/if}-->

				<!--{if !$article['closecomment'] && !$options['close_comment']}-->
					<div class="clear-height"></div>
					<a name="addcomment"></a>
					<h3 class="title">发表评论</h3>
					<form method="post" name="form" id="form" action="$options[url]post.php" onsubmit="return checkform();">
					<input type="hidden" name="articleid" value="$article[articleid]" />
					<input type="hidden" name="formhash" value="$formhash" />
					<div class="formbox">
					<!--{if $sax_uid}-->

						<p>已经登陆为 <b>$sax_user</b> [<a href="$options[url]cp.php?action=logout">注销</a>]</p>

					<!--{else}-->
						<p><label for="username">
							名字 (必填,如果已是注册用户请先登陆):<br /><input name="username" id="username" type="text" value="$_COOKIE[comment_username]" tabindex="1" class="formfield" style="width:400px;" />
							</label></p>
						<p><label for="email">
							E-mail (必填,不会被显示在前台,仅为方便联系):<br /><input name="email" id="email" type="text" value="$_COOKIE[comment_email]" tabindex="2" class="formfield" style="width: 400px;" />
						</label></p>
						<p><label for="url">
							网址 (选填):<br /><input type="text" name="url" id="url" value="$_COOKIE[comment_url]" tabindex="3" class="formfield" style="width: 400px;" />
						</label></p>
					<!--{/if}-->

					<p>评论内容 (必填):<br /><textarea name="content" id="content" cols="80" rows="10" tabindex="4" onkeydown="ctlent(event);" class="formfield">$_COOKIE[cmcontent]</textarea></p>

					<!--{if $options['seccode'] && $sax_group != 1 && $sax_group !=2}-->
						<p><label for="clientcode">
							验证码(*):<br />
							<input onfocus="updateseccode();this.onfocus = null;" name="clientcode" id="clientcode" value="" tabindex="3" class="formfield" size="6" maxlength="6" />
							<span id="seccodeimage"></span>
						</label></p>
					<!--{/if}-->

					<p><input type="hidden" name="action" value="addcomment" /><button type="submit" id="submit" name="submit">提交</button></p>

					</div>
					</form>
				<!--{/if}-->

			<!--{/if}-->
		</div>
		<div id="sidebar">

			<!--{if $options['show_calendar']}-->
				<div id="showcalendar">
					<table cellpadding="0" cellspacing="1" style="width:100%">
						<tr align="center">
							<td colspan="7" class="curdate"><a href="$prevmonth">&laquo;</a> $calendar[cur_date] <a href="$nextmonth">&raquo;</a></td>
						</tr>
						<tr>
							<th class="week"><span style="color:#833">日</span></th>
							<th class="week">一</th>
							<th class="week">二</th>
							<th class="week">三</th>
							<th class="week">四</th>
							<th class="week">五</th>
							<th class="week"><font color="#53A300">六</font></th>
						</tr>
						$calendar[html]
					</table>
				</div>
			<!--{/if}-->

			{template sidecomm}

			<!--{if $options['archives_num']}-->
				<h4>Archives</h4>
				<ul>
					<!--{if !$archivecache}-->
						<li>没有任何归档</li>
					<!--{else}-->
						<!--{loop $archivecache $key $data}-->
						<li><a href="$data[url]">$key</a> <span>($data[num])</span></li>
						<!--{/loop}-->
					<!--{/if}-->
				</ul>
			<!--{/if}-->

		</div>
	</div>